Skip to content

Fix for endpoint format string regression#42

Merged
alienzach merged 2 commits intomasterfrom
endpoint-str-fix
Oct 2, 2020
Merged

Fix for endpoint format string regression#42
alienzach merged 2 commits intomasterfrom
endpoint-str-fix

Conversation

@njhill
Copy link
Copy Markdown
Contributor

@njhill njhill commented Oct 1, 2020

Unfortunately there was a regression in the last release when using EtcdClusterConfig with an endpoint string that doesn't include a http:// or https:// prefix, and where TLS certs aren't provided. Per the prior behaviour this should imply plaintext connection but with the regression it attempts to use SSL.

Includes additional unit test to catch it.

And additional unit test to catch it
@njhill njhill added the bug Something isn't working label Oct 1, 2020
@njhill njhill requested a review from alienzach October 1, 2020 20:10
}
ssl = ep.startsWith("https://")
|| (!ep.startsWith("http://")
&& (certificate != null && clientCertificate != null))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLS client cert sometime is not required? Client may use other credentials to authenticate themselves.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes client-auth is optional (and it wasn't possible to provide explicit certs for that until the last release).

But yes there's also etcd-level auth i.e. username/password which were always supported independent of this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @alienzach, I had misunderstood your question. You're right, the && there should be ||, great catch! Now pushed fix.

@alienzach alienzach merged commit 616349b into master Oct 2, 2020
@njhill njhill deleted the endpoint-str-fix branch October 14, 2020 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants